String stringG = new String("And yet, it moves!");

Answer:

Yes.

A Method that Creates a String

Many methods of a String object create another String object.

For example, the substring(int begin) method creates a new String that contains a copy of part of the original data. Here is a program that uses this method:

class StringDemo3
{
  public static void main ( String[] args )
  {
    String str = new String( "Golf is a good walk spoiled." ); // create the original object

    String sub = str.substring(8); //create a new object from the original

    System.out.println( sub );

  }
}

The clause

str.substring(8)

creates a new String object, that contains its own data, which are characters copied from the original string. The copy starts with the 8th character of the original string and continues to the end. Character numbering starts at zero, so the 8th character in the original string is the first 'a'.

The substring of the original string is contained in a new String object. A reference to that new string is assigned to the reference variable sub.

QUESTION 11:

What characters are contained in the new object?